import { EventConfig } from "@/event/EventConfig";
import { EventManager } from "@/event/EventManager";
import { DateUtil } from "./DateUtil";
import { Logger } from "./Logger";

export class TimeUtil {

    public static init() {
        try {
            setInterval(() => {
                let now: number = DateUtil.now();
                EventManager.instance.dispatch(EventConfig.Event_Config.Timer, now)
            }, 100)
        } catch (error) {
            Logger.error("TimerUtil.error=-=", error)
        }
    }

}